package com.chuangan.releasetask.exception;

import com.chuangan.releasetask.enums.ResultEnum;
import lombok.Data;


/**
 * Created by 廖师兄
 * 2017-06-11 18:55
 */
@Data
public class ReleaseTaskException extends RuntimeException{

    private Integer code;

    public ReleaseTaskException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public ReleaseTaskException(Integer code, String message) {
        super(message);
        this.code = code;
    }

}
